﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using PivotIO.XML;

namespace PivotIO.Tests
{
    [TestClass]
    public class CollectionInfoIOTest
    {
        [TestInitialize]
        public void TestInit()
        {
            Utils.TestInit();
        }

        [TestCleanup]
        public void TestCleanup()
        {
            Utils.TestFinalize();
        }

        [TestMethod]
        public void TestExistsNo()
        {
            Assert.IsFalse(CollectionInfoIO.Exists(1));
        }

        [TestMethod]
        public void TestExistsYes()
        {
            CollectionInfoIO.SaveCollection(new PivotData.CollectionInfo() { Name = "hi", Id = 2 });
            Assert.IsTrue(CollectionInfoIO.Exists(2));
        }
    }
}
